using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._NetworkAnalystTools._NetworkDataset
{
    /// <summary>
    /// <para>Build Network</para>
    /// <para>Reconstructs the network connectivity and attribute information of a network dataset. The network dataset must be rebuilt after edits are made to the attributes or the features of a participating source feature class. After the source features are edited, the tool establishes the network connectivity only in the areas that have been edited to speed up the build process; however, when the network attributes are edited, the entire extent of the network dataset is rebuilt. This may be a slow operation on a large network dataset.</para>
    /// <para>重构网络数据集的网络连通性和属性信息。在对参与的源要素类的属性或要素进行编辑后，必须重新构建网络数据集。编辑源要素后，该工具仅在已编辑的区域中建立网络连接，以加快构建过程;但是，在编辑网络属性时，将重新构建网络数据集的整个范围。对于大型网络数据集，这可能是一个缓慢的操作。</para>
    /// </summary>    
    [DisplayName("Build Network")]
    public class BuildNetwork : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public BuildNetwork()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_in_network_dataset">
        /// <para>Input Network Dataset</para>
        /// <para>The network dataset to be built.</para>
        /// <para>要构建的网络数据集。</para>
        /// </param>
        public BuildNetwork(object _in_network_dataset)
        {
            this._in_network_dataset = _in_network_dataset;
        }
        public override string ToolboxName => "Network Analyst Tools";

        public override string ToolName => "Build Network";

        public override string CallName => "na.BuildNetwork";

        public override List<string> AcceptEnvironments => ["workspace"];

        public override object[] ParameterInfo => [_in_network_dataset, _out_network_dataset];

        /// <summary>
        /// <para>Input Network Dataset</para>
        /// <para>The network dataset to be built.</para>
        /// <para>要构建的网络数据集。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Network Dataset")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_network_dataset { get; set; }


        /// <summary>
        /// <para>Updated Input Network Dataset</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Updated Input Network Dataset")]
        [Description("")]
        [Option(OptionTypeEnum.derived)]
        public object _out_network_dataset { get; set; }


        public BuildNetwork SetEnv(object workspace = null)
        {
            base.SetEnv(workspace: workspace);
            return this;
        }

    }

}